﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WastedMechanics
{
    public class TalkReactions
    {
        public List<TalkReaction> Reactions;

        public TalkReactions()
        {
            Reactions = new List<TalkReaction>();
        }

        public TalkReaction PickReaction()
        {
            TalkReaction goodReaction = Reactions.Find(reaction => reaction.IsConditionFulfilled());
            if (goodReaction != null)
            {
                goodReaction.CallActions();                
                return goodReaction;         
            }
            Console.WriteLine("Warning: No possibilities to talk!");
            return null;      
        }
    }
}
